import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set from '@dfeidao/atom-web/local/set';

export default async function a004(fd: IFeidaoAiBrowserComponent, data: { hidden_source: string, hidden_name: string }) {
	// todo
	// set(fd, 'hidden_info', data);
	// console.log(data);
	const code = fd.data.node.querySelector<HTMLSpanElement>('[data-id="hidden_source1"]');
	const name = fd.data.node.querySelector<HTMLInputElement>('[data-id="hidden_name1"]');
	// const hidden_source = code.innerText;
	// data.hidden_name = name.value;
	const data1 = { hidden_source: code.innerText, hidden_name: name.value };
	code.innerHTML = data.hidden_source;// span设置值用innerHTML
	name.value = data.hidden_name;
	// console.log(code.innerText);
	// console.log(name.value);
	// data.hidden_source = code.innerText;
	// data.hidden_name = name.value;
	// console.log('1111' + data.hidden_name + data.hidden_source);
	set(fd, 'old_info', data1);
	set(fd, 'hidden_info', data);
	// code.innerHTML = data.hidden_source;// span设置值用innerHTML
	// name.value = data.hidden_name;
}
